﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using JPush.IM.Models;
using Jiguang.JPush;
using Jiguang.JPush.Model;
using Jiguang.JMessage.User;
using Jiguang.JMessage.Message;
using Newtonsoft.Json;

namespace JPush.IM.Controllers
{
    public class HomeController : Controller
    {
        //jpush
        private static Jiguang.JMessage.JMessageClient client = new Jiguang.JMessage.JMessageClient("79896d1b1bcda7104a4ed357", "84e356105d4db9982905b8d5");
        public IActionResult Index()
        {
            //UserInfo info = new UserInfo()
            //{
            //    Username="18889769",
            //    Password="123456"
            //};
            //List<UserInfo> listInfo = new List<UserInfo>();
            //listInfo.Add(info);
            //var tt = client.User.Register(listInfo);
            return View();
        }

        public IActionResult About()
        {
            ViewData["Message"] = "Your application description page.";
            return View();
        }

        public IActionResult Contact()
        {
            ViewData["Message"] = "Your contact page.";
            return View();
        }

        public IActionResult Error()
        {
            return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
        }

    }
}
